Ext.onReady(function(){

	//================================================================
	// Set ExtJS proterty.
	//================================================================
	Ext.BLANK_IMAGE_URL = m_ContextName + '/common/ext-2.2/resources/images/default/s.gif';
	Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
	Ext.QuickTips.init();
	
	//================================================================
	// Set Layout using Ext Viewport
	//================================================================
	var viewport = new Ext.Viewport({
		layout: 'border',
		items: [
			new Ext.Panel({
				region: 'center',
				id: 'id_panel_menu',
				contentEl: 'id_div_panel_div',
				height: 30,
				layout: 'fit',
				tbar: [{
					id: 'id_menu_connect',
					text: 'connect',
					iconCls: 'icon-grid',
					handler: fnNorthBtn1
				},{
					id: 'id_menu_search',
					text: 'scan',
					iconCls: 'icon-grid',
					handler: fnNorthBtn2,
					disabled: true
				}]
			})
		]
	});
	
	
	//================================================================
	// Action Function
	//================================================================
	function fnNorthBtn1()
	{
		var url = m_ContextName + '/analysis/analysis400Main.do';
		var name = 'win_popup_connect';
		var w = 350;
		var h = 200;
		
		var strPos = "resizable=yes, scrollbars=yes, status=yes, width=" + w + ", height=" + h + ", left=0, top=0";
		var nw_win = window.open(url, name, strPos);
		nw_win.focus();
	}
	
	function fnNorthBtn2()
	{
		var url = m_ContextName + '/analysis/analysis300Main.do?site=' + m_SiteName;
		var name = 'win_popup_search';
		var w = 500;
		var h = 300;
		
		var strPos = "resizable=yes, scrollbars=yes, status=yes, width=" + w + ", height=" + h + ", left=0, top=0";
		var nw_win = window.open(url, name, strPos);
		nw_win.focus();
	}
});

	
	
function fnEnableBtn(strName)
{
	Ext.getCmp('id_menu_search').enable();
	m_SiteName = strName;
}
	
	
	
	
	
	
	
	
	
	
	
	